package com.etlmaster.rowprocessor.transformer;

/**
 * @author Larry
 * @copyright Larry@etlMaster
 * @since 2017-09-10
 */
public class ReturnMessage {
	private String value;
	private String message;
	private int returnCode;
	private String returnStep;
	public static int Success=0;
	public static int Failed=-1;
	public static int Delayed=1;
	public ReturnMessage(int returnCode,String message){
		this.setReturnCode(returnCode);
		this.setMessage(message);
	}
	
	public ReturnMessage(int returnCode,String message,String value){
		this.setReturnCode(returnCode);
		this.setMessage(message);
		this.value = value;
	}
	public String toString(){
		StringBuffer sb=new StringBuffer();
		sb.append("{\"value\":"+getValue())
		.append(",\"returnCode\":\""+getReturnCode())
		.append("\",\"returnStep\":\""+getReturnStep())
		.append("\",\"message\":\""+getMessage()+"\"}");
		return sb.toString();
		
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}

	public int getReturnCode() {
		return returnCode;
	}

	public void setReturnCode(int returnCode) {
		this.returnCode = returnCode;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getReturnStep() {
		return returnStep;
	}

	public void setReturnStep(String returnStep) {
		this.returnStep = returnStep;
	}

}
